'use strict';

module.exports = appInfo => {
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1516848745409_2593';

  // add your config here
  config.mysql = {
    // database configuration
    client: {
      // host
      host: 'www.imshow.vip',
      // port
      port: '3306',
      // username
      user: 'db_ssh',
      // password
      password: 'db_ssh',
      // database
      database: 'db_ssh',
    },
    // load into app, default is open
    app: true,
    // load into agent, default is close
    agent: false,
  };
  config.security = {
    csrf: {
      ignoreJSON: true,
      ignore: '/*',
      xframe: {

      },
    },
    methodnoallow: {
      enable: false
    },
    domainWhiteList: [
      'http://localhost',
      'http://localhost:8000',
      'http://localhost:8080',
      'http://127.0.0.1:8001',
      'http://www.imshow.vip:8000',
      'http://www.imshow.vip:8080',

    ]
  };
  config.cors = {
    allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH',
    credentials: true
  }
  return config;
};
